home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group96a.txt
/
000086_icon-group-sender _Mon Apr 15 09:51:34 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1996-09-05
|
751b
Received: by cheltenham.cs.arizona.edu; Mon, 15 Apr 1996 12:27:30 MST
Message-Id: <9604151650.AA26404@odin.ucsd.edu>
To: rjhare@ed.ac.uk
Cc: icon-group@cs.arizona.edu
Subject: Re: random numbers...
In-Reply-To: Your message of "15 Apr 1996 09:27:09 -0000."
<9604150927.ab22893@uk.ac.ed.tattoo>
Date: Mon, 15 Apr 1996 09:51:34 -0700
From: William Griswold <wgg@cs.ucsd.edu>
Errors-To: icon-group-errors@cs.arizona.edu
Status: O
Boy, I really like the latter one:
x := x+?[-1,0,1]
However, you could more easily build a reusable abstraction using
your first example, if it is really a range:
x := x + chooseInRange(-1, 1)
procedure chooseInRange(low, high)
return ?(abs(high-low+1)) + (low-1)
end
--bill